import { includes, toLower } from 'lodash-es'

/**
 * 检查字符串 A 是否包含字符串 B，忽略大小写
 * @param source - 要检查的字符串 A
 * @param target - 用于匹配的字符串 B
 * @returns 如果 A 包含 B 则返回 true，否则返回 false
 */
export const includesIgnoreCase = (source: string, target: string): boolean =>
	includes(toLower(source), toLower(target))
